<?php

namespace App\Http\Controllers\Notify;

use App\Http\Controllers\Controller;
use App\Models\Live;
use Illuminate\Http\Request;

class LiveController extends Controller
{
    public function onPublish(Request $request)
    {
        Live::where('stream_id', $request->input('name'))->update(['state' => 1]);
    }

    public function onPublishDone(Request $request){
        Live::where('stream_id', $request->input('name'))->update(['state' => 2]);
    }
}
